<template>
	<view class="wrap">
		<scroll-view class="scroll-list" scroll-y="true">
			<MAP :coordinate="coordinate" :equipment_name="equipment_name"></MAP>
		</scroll-view>
	</view>
</template>

<script>
	import MAP from "@/components/map/map.vue";

	export default {
		components: {
			MAP
		},
		data() {
			return {
				coordinate: '',
				equipment_name: '设备1'
			};
		},
		onLoad(e) {
			if (e.coordinate) {
			    this.equipment_name = e.equipment_name
			    this.coordinate = e.coordinate
			    } else {
			      // 弹框提示设备未配置经纬度点
			      uni.showModal({
			        title: '提示',
			        content: '该设备未配置经纬度点。',
			        showCancel: false, // 不显示取消按钮
			        confirmText: '确定',
			        success: function (res) {
			          if (res.confirm) {
			            console.log('用户点击确定');
			          }
			        }
			      });
			    }
		},
		methods: {
			back() {
				uni.navigateBack();
			}
		},
	};
</script>

<style>
	@import 'style/equipMapPoint.css';
</style>